package com.wontube.core.remote;

import com.wontube.client.modle.vo.ClientSession;
import com.wontube.client.remote.IExitSessionHandler;
import com.wontube.core.annotation.NoLoginSupport;
import com.wontube.core.pub.SessionManager;
import com.wontube.core.pub.servlet.handlers.BasicHandler;

/**
 * @author yuechao
 *
 */
@NoLoginSupport
public class ExitSessionHandler extends BasicHandler implements IExitSessionHandler {	
	@Override
	public Boolean exit() {
		ClientSession session = super.getContext().getSession();
		if (session != null) {
			return SessionManager.manager.deleteSession(session.getSessionId());
		}
		
		return false;
	}
}
